package com.sptpc.learnspring.model;

import lombok.*;
import javax.persistence.*;
import java.io.Serializable;
import java.util.List;

@Entity
@Table(name = "t_category")
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Category extends BaseEntity implements Serializable {

    private String name;

//    @OneToMany(mappedBy = "category", fetch = FetchType.EAGER)
//    private List<Drink> drinks;

    @Override
    public String toString() {
        return "Category{" +
                "id='" + super.getId() + '\'' +
                " ,name='" + name + '\'' +
                "} ";
    }
}
